package com.yaowk.service.mall.clothing.entity;

import com.yaowk.service.common.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.ColumnDefault;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;

/**
 * 商品规格
 */
@Getter
@Setter
@ToString
@Entity
@DynamicInsert
@DynamicUpdate
public class CmSpecification extends BaseEntity<Integer> {

    @ColumnDefault("0")
    private Integer stock; // 库存
    private String name; // 规格名
    private Integer hight; // 身高
    private Float weight; // 体重
    private Integer shoulder; // 肩宽
    private Integer chestline; // 胸围
    private Integer neckline; // 领围
    private Integer waistline; // 腰围
    private Integer length; // 衣长
    private Integer hipline; // 臀围
    private Integer outseam; // 裤长

    @ManyToOne
    private CmGoods goods;
}
